from person import person


class student(person):
    __name: str = None
    __age: int = None
    __score: list[int] = None

    def __init__(self, name: str, age: int, score: list[int], phone: str, salary: float):
        super().__init__(phone, salary)
        self.__name = name
        self.__age = age
        self.__score = score

    def __str__(self):
        return f'Name: {self.__name}, Age: {self.__age}, Score: {self.__score}, Salary: {self._salary}, Phone: {self._phone}'

    def __lt__(self, __value):
        return self.__age < __value.__age

    def __eq__(self, __value):
        return self.__name == __value.__name

    # Public方法
    def say_hello(self):
        self.__say_hi()
        print(f'Hello {self.__name}')

    # Protect方法
    def _say_haha(self):
        print(f'hah {self.__name}')

    # Private方法
    def __say_hi(self):
        print(f'hi {self.__name}')

    # 覆写父类方法
    def call_phone(self):
        super().call_phone()
        print("子类覆写方法")

    # 方法注释
    def get_phone(self, phone: str) -> str:
        return phone
